package com.jboom.templates.statemachine.java.state;

/**
 * @author zhangwen
 * @date 2023/5/25 21:02
 */
public class OpenState extends State{
    @Override
    protected void open() {

    }

    @Override
    protected void close() {
        System.out.println("closing...");
        this.context.setCurState(Context.CLOSE_STATE);
    }

    @Override
    protected void running() {
        System.out.println("running...");
        this.context.setCurState(Context.RUNNING_STATE);
    }

    @Override
    protected void stop() {
        System.out.println("stopping");
        this.context.setCurState(Context.STOP_STATE);
    }
}
